import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import tabbar from './components/Tabbar.vue'
import myLazy from '@/plugins/index'

//适配rem
import 'amfe-flexible'

import search from '@/components/search.vue'
import ProductHeader from "@/components/ProductHeader.vue";

//导入路由
import router from './router/index'
//导入pinia

//引入瀑布流插件
import { VueMasonryPlugin } from 'vue-masonry'
//引入vant组件


// 2. 引入组件样式
import 'vant/lib/index.css'
import '@/permissions'
import pinia from '@/stores'
//引入vant组件
import {
	NavBar,
	Tabbar,
	TabbarItem,
	Space,
	Swipe,
	SwipeItem,
	Search,
	RadioGroup,
	Radio,
	Form,
	Field,
	CellGroup,
	Button,
	Checkbox,
	Icon,
	Toast,
	Col,
	Row,
	Grid,
	GridItem,
	Tab,
	Tabs,
	Sticky,
	BackTop,
	List,
	Loading,
	Card,
	SwipeCell,
	SubmitBar,
	Stepper,
	NoticeBar
} from 'vant'
// 2. 引入组件样式
import 'vant/lib/index.css'
import 'amfe-flexible'
const app = createApp(App)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Card)
app.use(SwipeCell)
app.use(SubmitBar)
app.use(Stepper)
app.use(NoticeBar)
app.use(RadioGroup)
app.use(Radio)
app.use(Form)
app.use(Field)
app.use(CellGroup)
app.use(Button)
app.use(Checkbox)
app.use(Icon)
app.use(Toast)
app.use(Col)
app.use(Row)
app.use(Grid)
app.use(NavBar)
app.use(Space)
app.use(Swipe)
app.use(Search)
app.use(SwipeItem)
app.use(GridItem)
app.use(Tab)
app.use(Tabs)
app.use(Sticky)
app.use(BackTop)
app.use(List)
app.use(Loading)
app.use(myLazy)
app.use(VueMasonryPlugin)


app.component('Navbar', tabbar)
app.component('Search', search)
app.component(ProductHeader.name, ProductHeader)


app.use(pinia)
app.use(router)
app.mount('#app')
